From d5ad1b906c0f286f2c932a87964c9896af5a1f09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Mon, 14 Nov 2016 20:42:16 +0100 Subject: [PATCH] babl.db: store git rev/version in header --- babl/babl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/babl/babl.c b/babl/babl.c index 2f63ac4..3199777 100644 --- a/babl/babl.c +++ b/babl/babl.c @@ -18,6 +18,7 @@ #include "config.h" #include "babl-internal.h" +#include "git-version.h" static int ref_count = 0; @@ -184,8 +185,8 @@ static const char *fish_cache_path (void) static int compare_fish_pixels (const void *a, const void *b) { - const Babl **fa = a; - const Babl **fb = b; + const Babl **fa = (void*)a; + const Babl **fb = (void*)b; return ((*fb)->fish.pixels - (*fa)->fish.pixels) + ((*fb)->fish.processings - (*fa)->fish.processings); } @@ -197,7 +198,7 @@ static void babl_store_db (void) FILE *dbfile = fopen (fish_cache_path (), "w"); if (!dbfile) return; - fprintf (dbfile, "#babl 0 %i fishes\n", db->babl_list->count); + fprintf (dbfile, "#%s\n", BABL_GIT_VERSION); /* sort the list of fishes by usage, making next run more efficient - * and the data easier to approach as source of profiling -- 2.30.2